package com.example.text.service;

import com.example.text.entity.News;
import org.springframework.data.elasticsearch.core.SearchHits;

import java.util.List;
import java.util.Optional;

public interface NewsService {

    News save(News news);

    Optional<News> findById(String id);

    void deleteById(String id);

    List<News> findAll();

    SearchHits<News> search(String keyword);

    List<News> searchWithoutHighlight(String keyword);
}
